package com.jimikongjian.service.base;

import com.jimikongjian.models.EmailVo;

import java.util.Date;

/**
 * Created by fuxiuyang on 17/3/16.
 */
public interface IEmailService {
    /**
     * 发送简单文本Email消息
     * @param emailVo
     */
    public void sendEmailMessageOfSimpleText(EmailVo emailVo, Date date);

    /**
     * 发送HTML格式的消息
     * @param emailVo
     * @param date
     */
    public void sendEmailMessageOfHtmlText(EmailVo emailVo, Date date) throws Exception;

    /**
     * 带附件并且html格式邮件发送,带附件并简单文本格式邮件发送
     * @param emailVo
     */
    public void sendEmailMessageOfAttachedFileAndSimpleText(EmailVo emailVo, Date date, boolean isHtmlText) throws Exception;

    /**
     * 检测邮箱地址的合法性
     * @param emailAddress
     * @return 如果邮箱地址合法则返回true,否则返回false
     */
    public boolean isEmail(String emailAddress);
}
